package xyz.robinbingo.turing.dubbo.common.protocol.http;

import xyz.robinbingo.turing.dubbo.common.protocol.ProtocolService;
import xyz.robinbingo.turing.dubbo.common.protocol.invocation.Invocation;

/**
 * HttpProtocolServiceImpl
 *
 * @author Robin
 * @date 2021/1/29 下午5:24
 **/
public class HttpProtocolServiceImpl implements ProtocolService {
    @Override
    public void start(String hostname, int port) {
        new CustomHttpServer().start(hostname, port);
    }

    @Override
    public Object send(String hostname, int port, Invocation invocation) {
        return new CustomHttpClient().send(hostname, port, invocation);
    }
}
